package com.pdd.beans;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 订单实体类
 */
@Getter
@Setter
@ToString
public class Order {

        private String  o_id;        //订单编号 156yyyyMMddHHmmssrand
        private int     u_id;        //用户编号，外键user表
        private String  address;   //收货地址
        private String  name;      //收货姓名
        private String  tel;       //联系方式
        private String  money;     //订单总额
        private Date    time;      //下单时间
        private boolean status;    //订单状态
        private String times;

        public String getTimes() {
                return new SimpleDateFormat("yyyy-MM-dd  HH:mm:ss").format(time);
        }
}
